package com.example.controller;

import com.didispace.dto.User;
import com.example.service.RefactorHelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RefactorHelloControl {
    @Autowired
    RefactorHelloService refactorHelloService;

    @RequestMapping(value = "/feign-consumer2", method = RequestMethod.GET)
    public String hello2(){
        return refactorHelloService.hello("tom");
    }


    @RequestMapping(value = "/feign-consumer3", method = RequestMethod.GET)
    public User hello3(){
        return refactorHelloService.hello("tom", 12);
    }
}
